Fitch stripped Panama of its investment grade credit rating saying the country’s fiscal and governance challenges have been aggravated by the closure of the country’s largest mine last year.

The ratings agency lowered the country to BB+ from BBB- with a stable outlook, according to report issued on Thursday.

Growing fiscal deficits since the pandemic pose a problem for a country heavily reliant on global markets for funding, Fitch said.

And the Panamanian Supreme Court’s decision last November to invalidate a contract between the government and Canadian mining company First Quantum Minerals to operate the Minera Panama copper mine “complicates” the outlook for the public finances, the report said.

The closure of the mine “will significantly dent growth this year, given that it represents 5% of GDP and 7% of current external receipts,” Fitch said. The outcome “will also deprive the government of 0.5%-of-GDP in expected annual royalties and raises the threat of a costly arbitration,” it added.

Fitch had signaled the country’s debt could be relegated to speculative grade by changing its outlook on the rating to negative in September. Still, in a sign of investor confidence in the country’s fundamentals, Panama went on to price its biggest-ever sale of global bonds last month.

The ratings agency expects the winner of the upcoming presidential elections in May to address Panama’s fiscal and governance issues. It remains uncertain, however, if and when the mine could reopen because it would require the new administration to “achieve a major shift in popular sentiment and overcome legal hurdles, such as overturning a recently enacted mining moratorium,” Fitch said.

“The political and social backdrop for addressing difficult issues appears challenging given party fragmentation, recent social tensions and an economic slowdown,” it added.

Moody’s downgraded Panama by one notch to Baa3 — its lowest investment grade — in November last year amid public protests against the copper mine. That same month, S&P Global revised the outlook for its BBB rating, the second-lowest investment grade, to negative.